﻿@inject IStringLocalizer<InputGroupsNormal> Localizer
@inject IStringLocalizer<Foo> LocalizerFoo

<div>
    <div class="row g-3">
        <div class="col-12 col-sm-6">
            <BootstrapInputGroup>
                <BootstrapInputGroupLabel DisplayText="@Localizer["InputGroupsNormalUserName"]" />
                <BootstrapInput @bind-Value="@BindValue" />
            </BootstrapInputGroup>
        </div>
        <div class="col-12 col-sm-6">
            <BootstrapInputGroup>
                <BootstrapInput @bind-Value="@BindValue" />
                <Button Icon="fa-solid fa-magnifying-glass"></Button>
            </BootstrapInputGroup>
        </div>
    </div>
</div>

@code {
    /// <summary>
    /// Foo 类为Demo测试用，如有需要请自行下载源码查阅
    /// Foo class is used for Demo test, please download the source code if necessary
    /// https://gitee.com/LongbowEnterprise/BootstrapBlazor/blob/main/src/BootstrapBlazor.Shared/Data/Foo.cs
    /// </summary>
    [NotNull]
    private Foo? Model { get; set; }

    private string BindValue { get; set; } = string.Empty;

    /// <summary>
    /// OnInitialized 方法
    /// </summary>
    protected override void OnInitialized()
    {
        Model = Foo.Generate(LocalizerFoo);
    }
}
